﻿var App = {
    Models: {},
    Views: {},
    Collections: {},
    initialize: function () {
    }
};

App.Models.Category = Backbone.Model.extend();

App.Collections.Categories = Backbone.Collection.extend({
        model: App.Models.Category
    });

App.Views.Categories = Backbone.View.extend({
        tagName: 'div',
        className: 'span3',
        template: _.template($('#categories-template').html()),
        render: function() {
            $(this.el).html(this.template(this.model));
            return this;
        }
    });

    App.Views.Item = Backbone.View.extend({
        tagName: 'div',
        className: 'row-fluid',
        template: _.template($('#item-template').html()),
        render: function () {
            $(this.el).html(this.template(this.model));
            return this;
        }
    });


